package ar.com.gep.soccer.entities;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import ar.com.cdt.framework.persistence.entity.Base;

@Entity
public class Team extends Base {

	private static final long serialVersionUID = -7903948120646096595L;

	@Column(length = 50, nullable = false, unique = true)
	private String name;

	@ManyToOne(fetch=FetchType.LAZY, cascade = CascadeType.ALL)
	@JoinColumn(name="skill_id", nullable = true)
	private Skill skill;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Skill getSkill() {
		return skill;
	}

	public void setSkill(Skill skill) {
		this.skill = skill;}

}
